package com.ixiaowo.springcouldconsumermovie.controller;


import com.ixiaowo.springcouldconsumermovie.feign.UserFeignClient;
import com.ixiaowo.springcouldconsumermovie.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MoiveController {
    @Resource
    private UserFeignClient userFeignClient;

    /**
     * feign Get 调用方式.
     * @param id
     * @return
     */
    @GetMapping("/movie/{id}")
    public User findById(@PathVariable Long id){
        System.out.println("进入到 EureKa Moive");
      return  this.userFeignClient.findById(id);
    }
}
